<h1>Listing factures</h1>
<table>
  <tr>
    <th>id</th>
    <th>Category</th>
    <th>User</th>
    <th>Name</th>
    <th>Cout</th>
  </tr>

<% for facture in @factures %>
  <tr>
    <td><%=h facture.id %></td>
    <td><%=h facture.category.name %></td>
    <td><%=h facture.user.name %></td>
    <td><%=h facture.name %></td>
    <td><%=h facture.cout %></td>
    <td><%= link_to 'Show', facture %></td>
    <td><%= link_to 'Edit', edit_facture_path(facture) %></td>
    <td><%= link_to 'Destroy', facture, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>
<% for type in Factype.find(:all) %>
<%= type.name.to_sym %><br>
<%= type.name.to_s %><br>
<% end %>


<br />

<%= link_to 'New facture', new_facture_path %>

<br>
